package com.fasterxml.jackson.databind.cfg;

import com.fasterxml.jackson.databind.AbstractTypeResolver;
import com.fasterxml.jackson.databind.deser.BeanDeserializerModifier;
import com.fasterxml.jackson.databind.deser.Deserializers;
import com.fasterxml.jackson.databind.deser.KeyDeserializers;
import com.fasterxml.jackson.databind.deser.ValueInstantiators;
import com.fasterxml.jackson.databind.deser.std.StdKeyDeserializers;
import java.io.Serializable;

public class DeserializerFactoryConfig implements Serializable {
    protected static final KeyDeserializers[] DEFAULT_KEY_DESERIALIZERS = new KeyDeserializers[]{new StdKeyDeserializers()};
    protected static final AbstractTypeResolver[] NO_ABSTRACT_TYPE_RESOLVERS = new AbstractTypeResolver[0];
    protected static final Deserializers[] NO_DESERIALIZERS = new Deserializers[0];
    protected static final BeanDeserializerModifier[] NO_MODIFIERS = new BeanDeserializerModifier[0];
    protected static final ValueInstantiators[] NO_VALUE_INSTANTIATORS = new ValueInstantiators[0];
    protected final AbstractTypeResolver[] _abstractTypeResolvers;
    protected final Deserializers[] _additionalDeserializers;
    protected final KeyDeserializers[] _additionalKeyDeserializers;
    protected final BeanDeserializerModifier[] _modifiers;
    protected final ValueInstantiators[] _valueInstantiators;

    public DeserializerFactoryConfig() {
        this(null, null, null, null, null);
    }

    protected DeserializerFactoryConfig(Deserializers[] allAdditionalDeserializers, KeyDeserializers[] allAdditionalKeyDeserializers, BeanDeserializerModifier[] modifiers, AbstractTypeResolver[] atr, ValueInstantiators[] vi) {
        if (allAdditionalDeserializers == null) {
            allAdditionalDeserializers = NO_DESERIALIZERS;
        }
        this._additionalDeserializers = allAdditionalDeserializers;
        if (allAdditionalKeyDeserializers == null) {
            allAdditionalKeyDeserializers = DEFAULT_KEY_DESERIALIZERS;
        }
        this._additionalKeyDeserializers = allAdditionalKeyDeserializers;
        if (modifiers == null) {
            modifiers = NO_MODIFIERS;
        }
        this._modifiers = modifiers;
        if (atr == null) {
            atr = NO_ABSTRACT_TYPE_RESOLVERS;
        }
        this._abstractTypeResolvers = atr;
        if (vi == null) {
            vi = NO_VALUE_INSTANTIATORS;
        }
        this._valueInstantiators = vi;
    }
}
